﻿using BCCommon;
using BCDto.FMIS.SOBSetting;
using BCDto.MySql.Admin;
using BCDto.OA.ApplyOrder;

namespace BCService.OA.ApplyOrder.ServiceFactory
{
    /// <summary>
    /// OA申请单服务工厂
    /// </summary>
    [NonInjection]
    public interface IOAApplyOrderFactoryService
    {
        /// <summary>
        /// 创建一个OA申请单服务
        /// </summary>
        /// <param name="admin">管理员信息</param>
        /// <param name="dto">申请信息</param>
        /// <param name="sobSetting">账套信息</param>    
        /// /// <returns></returns>
        ApplyOrderDto Create(AdminDto admin, ApplyOrderRequestDto dto, SOBSettingDto sobSetting = null);
        /// <summary>
        /// 查看申请单详情
        /// </summary>
        /// <param name="admin">当前登录人员</param>
        /// <param name="applyOrderId">申请单Id</param>
        /// <returns></returns>
        ApplyOrderViewDto GetDetail(AdminDto admin, long applyOrderId);
        /// <summary>
        /// 审核通过
        /// </summary>
        /// <param name="admin">当前登录人员</param>
        /// <param name="applyOrderId">申请单Id</param>
        /// <returns></returns>
        ApplyOrderViewDto Pass(AdminDto admin, long applyOrderId);

        /// <summary>
        /// 审核拒绝
        /// </summary>
        /// <param name="admin">当前登录人员</param>
        /// <param name="applyOrderId">申请单Id</param>
        /// <param name="dto">拒绝原因</param>
        /// <returns></returns>
        ApplyOrderViewDto Rejected(AdminDto admin, long applyOrderId, ApplyOrderRejectRequestDto dto);
    }
}
